Optimal. Leaf size=37 \[ x (a B+A b)+\frac{a A \log (\sin (c+d x))}{d}-\frac{b B \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0687638, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3589, 3475, 3531} \[ x (a B+A b)+\frac{a A \log (\sin (c+d x))}{d}-\frac{b B \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3589
Rule 3475
Rule 3531
Rubi steps
\begin{align*} \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx &=(b B) \int \tan (c+d x) \, dx+\int \cot (c+d x) (a A+(A b+a B) \tan (c+d x)) \, dx\\ &=(A b+a B) x-\frac{b B \log (\cos (c+d x))}{d}+(a A) \int \cot (c+d x) \, dx\\ &=(A b+a B) x-\frac{b B \log (\cos (c+d x))}{d}+\frac{a A \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0720034, size = 44, normalized size = 1.19 \[ \frac{a A (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}+a B x+A b x-\frac{b B \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 51, normalized size = 1.4 \begin{align*} Axb+aBx+{\frac{Aa\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}+{\frac{Abc}{d}}-{\frac{Bb\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{Bac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.49574, size = 70, normalized size = 1.89 \begin{align*} \frac{2 \, A a \log \left (\tan \left (d x + c\right )\right ) + 2 \,{\left (B a + A b\right )}{\left (d x + c\right )} -{\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.02036, size = 146, normalized size = 3.95 \begin{align*} \frac{2 \,{\left (B a + A b\right )} d x + A a \log \left (\frac{\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - B b \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.671062, size = 78, normalized size = 2.11 \begin{align*} \begin{cases} - \frac{A a \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{A a \log{\left (\tan{\left (c + d x \right )} \right )}}{d} + A b x + B a x + \frac{B b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (A + B \tan{\left (c \right )}\right ) \left (a + b \tan{\left (c \right )}\right ) \cot{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17955, size = 72, normalized size = 1.95 \begin{align*} \frac{2 \, A a \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 2 \,{\left (B a + A b\right )}{\left (d x + c\right )} -{\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]